-
Notifications
You must be signed in to change notification settings - Fork 93
feat(integrations): add Agno integration docs #1529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nitpick from my side, otherwise LGTM
Co-authored-by: Michał Olender <[email protected]>
@TC-MO we can merge now |
834bd22
to
abc37be
Compare
This is ready |
Cool. I'll review it today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ohlava Nice. Thanks! I left a couple of comments.
The major was that agent
requires OPENAI_API_KEY
|
||
### Prerequisites | ||
|
||
- *Apify API token*: Obtain your token from the [Apify console](https://console.apify.com/account/integrations). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- *Apify API token*: Obtain your token from the [Apify console](https://console.apify.com/account/integrations). | |
- *Apify API token*: Obtain your API token from the [Apify console](https://console.apify.com/account/integrations). | |
- *OpenAI API key*: Get your API key from the [OpenAI platform](https://platform.openai.com/account/api-keys) |
from agno.agent import Agent | ||
from agno.tools.apify import ApifyTools | ||
|
||
# Initialize the agent with Apify tools | ||
agent = Agent( | ||
tools=[ | ||
ApifyTools( | ||
actors=["apify/rag-web-browser"], | ||
apify_api_token="YOUR_APIFY_API_TOKEN" # Replace YOUR_APIFY_API_TOKEN with your token | ||
) | ||
], | ||
show_tool_calls=True, | ||
markdown=True | ||
) | ||
|
||
# Fetch and display web content | ||
agent.print_response("Extract key details from https://docs.agno.com/introduction", markdown=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from agno.agent import Agent | |
from agno.tools.apify import ApifyTools | |
# Initialize the agent with Apify tools | |
agent = Agent( | |
tools=[ | |
ApifyTools( | |
actors=["apify/rag-web-browser"], | |
apify_api_token="YOUR_APIFY_API_TOKEN" # Replace YOUR_APIFY_API_TOKEN with your token | |
) | |
], | |
show_tool_calls=True, | |
markdown=True | |
) | |
# Fetch and display web content | |
agent.print_response("Extract key details from https://docs.agno.com/introduction", markdown=True) | |
import os | |
from agno.agent import Agent | |
from agno.tools.apify import ApifyTools | |
os.environ["APIFY_API_TOKEN"] = "YOUR_APIFY_API_TOKEN" # Replace with your Apify API token | |
os.environ["OPENAI_API_KEY"] = "YOUR_OPENAI_API_KEY" # Replace with your OpenAI API key | |
# Initialize the agent with Apify tools | |
agent = Agent( | |
tools=[ApifyTools( actors=["apify/rag-web-browser"])], | |
show_tool_calls=True, | |
markdown=True | |
) | |
# Fetch and display web content | |
agent.print_response("Extract key details from https://docs.agno.com/introduction", markdown=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to add OPENAPI key, otherwise I'm got:
agno.exceptions.ModelProviderError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
Hence it make sense to add the both keys into env vars.
:::tip Environment variable token | ||
|
||
You can also set the APIFY_API_TOKEN environment variable instead of passing it directly in the code. | ||
|
||
::: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:::tip Environment variable token | |
You can also set the APIFY_API_TOKEN environment variable instead of passing it directly in the code. | |
::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's skip this suggestion
|
||
::: | ||
|
||
### Advanced Scenario: Travel Planning Agent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Advanced Scenario: Travel Planning Agent | |
### Advanced scenario: Travel planning agent |
from agno.agent import Agent | ||
from agno.tools.apify import ApifyTools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from agno.agent import Agent | |
from agno.tools.apify import ApifyTools | |
import os | |
from agno.agent import Agent | |
from agno.tools.apify import ApifyTools | |
os.environ["APIFY_API_TOKEN"] = "YOUR_APIFY_API_TOKEN" # Replace with your Apify API token | |
os.environ["OPENAI_API_KEY"] = "YOUR_OPENAI_API_KEY" # Replace with your OpenAI API key |
], | ||
apify_api_token="YOUR_APIFY_API_TOKEN" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
], | |
apify_api_token="YOUR_APIFY_API_TOKEN" | |
] |
|
||
::: | ||
|
||
### Available Apify Tools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Available Apify Tools | |
### Available Apify tools |
## Configuration Options | ||
|
||
| Parameter | Type | Default | Description | | ||
| ---------------------------- | ------------------- | ------- | ------------------------------------------------------------------ | | ||
| `apify_api_token` | `str` | `None` | Apify API token (or set via APIFY_API_TOKEN environment variable) | | ||
| `actors` | `str` or `List[str]`| `None` | Single Actor ID or list of Actor IDs to register | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Configuration Options | |
| Parameter | Type | Default | Description | | |
| ---------------------------- | ------------------- | ------- | ------------------------------------------------------------------ | | |
| `apify_api_token` | `str` | `None` | Apify API token (or set via APIFY_API_TOKEN environment variable) | | |
| `actors` | `str` or `List[str]`| `None` | Single Actor ID or list of Actor IDs to register | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need this table?
I think the examples are enough. This table does not add much value IMO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it gives more structure to information and makes it more scannable. But given that it's only two options I think this could also be remade to text.
- *Apify API token*: Obtain your token from the [Apify console](https://console.apify.com/account/integrations). | ||
- *Python environment*: Ensure Python is installed (version 3.8+ recommended). | ||
- *Required packages*: Install the following dependencies in your terminal: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use _ instead of * for emphasis
- *Apify API token*: Obtain your token from the [Apify console](https://console.apify.com/account/integrations). | |
- *Python environment*: Ensure Python is installed (version 3.8+ recommended). | |
- *Required packages*: Install the following dependencies in your terminal: | |
- _Apify API token_: Obtain your token from the [Apify console](https://console.apify.com/account/integrations). | |
- _Python environment_: Ensure Python is installed (version 3.8+ recommended). | |
- _Required packages_: Install the following dependencies in your terminal: |
## Configuration Options | ||
|
||
| Parameter | Type | Default | Description | | ||
| ---------------------------- | ------------------- | ------- | ------------------------------------------------------------------ | | ||
| `apify_api_token` | `str` | `None` | Apify API token (or set via APIFY_API_TOKEN environment variable) | | ||
| `actors` | `str` or `List[str]`| `None` | Single Actor ID or list of Actor IDs to register | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it gives more structure to information and makes it more scannable. But given that it's only two options I think this could also be remade to text.
This PR adds documentation for integrating Apify with the Agno framework, enabling users to enhance AI agents with any Apify Actor from the store.
Connected to PR#2566
Changes:
Related Issues: Closes #1511